{extend name='table'}

{block name="content"}
<div class="layui-tab layui-tab-card" style="margin-top: 0;">
    <div class="layui-tab-content">
        {include file='goods/ozon/warehouse/index_search'}
        <table id="HouseTable" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
    </div>
</div>
{/block}

{block name='script'}
<script>
    $(function () {
        // 初始化表格组件
        $('#HouseTable').layTable({
            even: true, height: 'full',
            // sort: {field: 'id', type: 'desc'},
            toolbar: '#toolbarDemo',
            where: {type: '{$type|default=""}'},
            cols: [[
                {checkbox: true, fixed: true},
                /** {if $super} **/
                {field: 'company_name', title: '{:lang("公司")}', minWidth: 130, align: 'center'},
                /** {/if} **/
                {field: 'shop_name', title: '{:lang("店铺名称")}', minWidth: 130, align: 'center'},
                {field: 'name', title: '{:lang("仓库名称")}', minWidth: 130, align: 'center'},
                {field: 'is_rfbs_name', title: '{:lang("rFBS计划运作")}', minWidth: 120, align: 'center'},
                {field: 'is_kgt_name', title: '{:lang("大宗商品")}', minWidth: 120, align: 'center'},
                {field: 'min_working_days', title: '{:lang("运行天数")}',minWidth: 120, align: 'center'},
                {field: 'postings_limit', title: '{:lang("极限值")}', minWidth: 120, align: 'center'},
                {field: 'status_name', title: '{:lang("状态")}', minWidth: 120, align: 'center'},
                {field: 'create_at', title: '{:lang("添加时间")}', width: 160, align: 'center'},
                {field: 'update_at', title: '{:lang("更新时间")}', width: 160, align: 'center'},
                {toolbar: '#toolbar', align: 'center', width: 100, title: '{:lang("操作")}', fixed: 'right'},
            ]]
        });

    });
</script>

<script type="text/html" id="toolbarDemo">
    <!--{if auth("pushOzon")}-->
    <button  data-modal='{:url("pushOzon")}' data-title="{:lang('同步仓库')}"  class='layui-btn layui-btn-sm'>{:lang('同步仓库')}</button>
    <!--{/if}-->
</script>

<!-- 数据操作工具条模板 -->
<script type="text/html" id="toolbar">
    <!--{if auth("remove")}-->
    <a class="layui-btn layui-btn-danger layui-btn-xs" data-confirm="{:lang('确定要删除数据吗?')}" data-action="{:url('remove')}" data-value="id#{{d.id}}">{:lang('删 除')}</a>
    <!--{/if}-->
</script>
{/block}